package com.ygnn.reggie.common;

public class BaseContext {

//    基于ThreadLocal封装工具类，用户保存和获取当前登录id
//    在过滤器那里设置线程id
    private static ThreadLocal<Long> threadLocal=new ThreadLocal<>();
    public static  void setThreadLocal(Long id ){
        threadLocal.set(id);
    }
    public static Long getCurrentId(){

        return  threadLocal.get();
    }
}
